Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

458
Views
Webpack <5 Problema al usar firebase admin

Cuando quiero usar el SDK de administración de firebase usando el siguiente código

 import * as admin from 'firebase-admin'; var serviceAccount = require("../services/serviceAccountKey.json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://voter-60a9f-default-rtdb.europe-west1.firebasedatabase.app" });

me sale este error

 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }' - install 'util' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "util": false }

Este es solo uno de muchos. También tengo esto:

 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }' - install 'path-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "path": false }

y así....

Intenté reinstalar los módulos de Node pero no tuve suerte. Tampoco entiendo dónde debo agregar ese respaldo que sugieren. Y si lo encontrara, ¿necesito agregar esto para todos los módulos de nodo?

¡Gracias!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Enfrenté este mismo error, lo que puedes hacer es ir a node_modules/react-scripts/config/webpack-config.js y hacer estos cambios

 resolve: { modules: ..., extensions: ..., alias: {...}, fallback: { "fs": false, "tls": false, "net": false, "path": false, "zlib": false, "http": false, "https": false, "stream": false, "crypto": false, "crypto-browserify": false, "url": require.resolve("url"), "os": false, "os-browserify": false, "querystring": false, "buffer": false, "constants": false, "child_process": false }, plugins: [...] },
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!